home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / New System Software Extensions / OpenDoc A6 / SOM / OpenDoc and SOM / CPlusPlus / LinkSpec.xh < prev    next >
Encoding:
Text File  |  1994-04-19  |  2.9 KB  |  142 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: Locrian:WWDCSun:CPlusPlus:LinkSpec.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: somc/smemit.c
  7.  *     SOM Emitter emitxh.dll: somc/smmain.c
  8.  */
  9.  
  10. /*
  11.  * 
  12.  *  Theory of Operation
  13.  * 
  14.  * 
  15.  *  Classes defined in this interface
  16.  * 
  17.  */
  18.  
  19.  
  20. #ifndef SOM_ODLinkSpec_xh
  21. #define SOM_ODLinkSpec_xh
  22.  
  23. class ODLinkSpec;
  24.  
  25. #define ODLinkSpec_MajorVersion 1
  26. #define ODLinkSpec_MinorVersion 0
  27.  
  28. /* C++ som defs */
  29. #include <somcls.xh>
  30.  
  31. /* Include C++ parent defs */
  32. #ifndef SOM_ODBaseLinkSpec_xh
  33. #include <LinkSpcB.xh>
  34. #endif
  35.  
  36. #ifndef ODLinkSpec_API
  37. #define ODLinkSpec_API
  38. /*
  39.  * -- The Class API
  40.  */
  41.  
  42. /*
  43.  * Start of user-defined types:
  44.  */
  45. class ODExtension;
  46. class ODStorageUnit;
  47. class ODPart;
  48. class ODDraft;
  49.  
  50. /*
  51.  * End of user-defined types.
  52.  */
  53.  
  54. #if applec ^ PRAGMA_LIB_EXPORT
  55. #pragma lib_export on
  56. #endif
  57.  
  58.  
  59. /* A procedure to create the ODLinkSpec Class */
  60. SOMEXTERN SOMClass * SOMLINK ODLinkSpecNewClass(
  61.         integer4 majorVersion,
  62.         integer4 minorVersion);
  63.  
  64. /* The API to the ODLinkSpec class object, and the methods it introduces. */
  65. typedef struct ODLinkSpecClassDataStructure {
  66.     SOMClass *classObject;
  67.     somMToken reserved1;
  68.     somMToken reserved2;
  69.     somMToken reserved3;
  70.     somMToken reserved4;
  71.     somMToken reserved5;
  72.     somMToken reserved6;
  73.     somMToken reserved7;
  74.     somMToken reserved8;
  75.     somMToken reserved9;
  76. } ODLinkSpecClassDataStructure;
  77. #ifdef SOM_NO_DATA_EXPORTS
  78.    SOMEXTERN ODLinkSpecClassDataStructure * ODLinkSpecGetClassData ( void );
  79. #   undef ODLinkSpecClassData
  80. #   define ODLinkSpecClassData (*ODLinkSpecGetClassData())
  81. #else
  82.    SOMEXTERN ODLinkSpecClassDataStructure ODLinkSpecClassData;
  83. #endif /* SOM_NO_DATA_EXPORTS */
  84.  
  85. #if applec ^ PRAGMA_LIB_EXPORT
  86. #pragma lib_export off
  87. #endif
  88.  
  89. #define _ODLinkSpec ODLinkSpecClassData.classObject
  90.  
  91. /* The API to parentMtabs for ODLinkSpec, and the instance data it introduces. */
  92. SOMEXTERN struct ODLinkSpecCClassDataStructure {
  93.     somMethodTabs parentMtab;
  94.     somDToken instanceDataToken;
  95. } ODLinkSpecCClassData;
  96.  
  97. /*
  98.  * -- Typedefs for Procedures that support Methods introduced by ODLinkSpec
  99.  */
  100. SOMEXTERN {
  101. }
  102.  
  103. #endif /* ODLinkSpec_API */
  104.  
  105.  
  106. /*
  107.  * -- Method Tokens are Thunks
  108.  */
  109. #undef somresolve_
  110. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  111.  
  112. /*
  113.  * -- The C++ Wrapper Class for ODLinkSpec
  114.  */
  115. class ODLinkSpec : public ODBaseLinkSpec
  116. {
  117. public:
  118.  
  119. void *operator new(size_t size)
  120. {
  121.    SOM_IgnoreWarning(size);
  122.    if (!ODLinkSpecClassData.classObject) 
  123.       ODLinkSpecNewClass(ODLinkSpec_MajorVersion,ODLinkSpec_MinorVersion);
  124.    return (void *)
  125.       ((somTD_SOMClass_somNew)
  126.       somresolve_((SOMObject *)((void*)(ODLinkSpecClassData.classObject)),
  127.                  SOMClassClassData.somNew))
  128.          ((SOMClass *)((void*)(ODLinkSpecClassData.classObject)));
  129. }
  130.  
  131. void operator delete(void * obj)
  132. {
  133.    ((SOMObject *)obj)->somFree();
  134. }
  135.  
  136.  
  137. };   /* ODLinkSpec */
  138.  
  139.  
  140.  
  141. #endif       /* SOM_ODLinkSpec_xh */
  142.